﻿<template>
  <a-modal
    :title="title"
    width="40%"
    :visible="visible"
    :confirmLoading="loading"
    @ok="handleSubmit"
    @cancel="()=>{this.visible=false}"
  >
    <a-spin :spinning="loading">
      <a-form-model ref="form" :model="entity" :rules="rules" v-bind="layout">
        <a-form-model-item label="销售订单子表标识" prop="AutoID">
          <a-input v-model="entity.AutoID" autocomplete="off" placeholder="销售订单子表标识" />
        </a-form-model-item>
        <a-form-model-item label="销售订单号" prop="cSOCode">
          <a-input v-model="entity.cSOCode" autocomplete="off" placeholder="销售订单号" />
        </a-form-model-item>
        <a-form-model-item label="存货编码" prop="cInvCode">
          <a-input v-model="entity.cInvCode" autocomplete="off" placeholder="存货编码" />
        </a-form-model-item>
        <a-form-model-item label="预发货日期" prop="dPreDate">
          <a-input v-model="entity.dPreDate" autocomplete="off" placeholder="预发货日期" />
        </a-form-model-item>
        <a-form-model-item label="数量" prop="iQuantity">
          <a-input v-model="entity.iQuantity" autocomplete="off" placeholder="数量" />
        </a-form-model-item>
        <a-form-model-item label="辅计量数量" prop="iNum">
          <a-input v-model="entity.iNum" autocomplete="off" placeholder="辅计量数量" />
        </a-form-model-item>
        <a-form-model-item label="报价" prop="iQuotedPrice">
          <a-input v-model="entity.iQuotedPrice" autocomplete="off" placeholder="报价" />
        </a-form-model-item>
        <a-form-model-item label="原币无税单价" prop="iUnitPrice">
          <a-input v-model="entity.iUnitPrice" autocomplete="off" placeholder="原币无税单价" />
        </a-form-model-item>
        <a-form-model-item label="原币含税单价" prop="iTaxUnitPrice">
          <a-input v-model="entity.iTaxUnitPrice" autocomplete="off" placeholder="原币含税单价" />
        </a-form-model-item>
        <a-form-model-item label="原币无税金额" prop="iMoney">
          <a-input v-model="entity.iMoney" autocomplete="off" placeholder="原币无税金额" />
        </a-form-model-item>
        <a-form-model-item label="原币税额" prop="iTax">
          <a-input v-model="entity.iTax" autocomplete="off" placeholder="原币税额" />
        </a-form-model-item>
        <a-form-model-item label="原币价税合计" prop="iSum">
          <a-input v-model="entity.iSum" autocomplete="off" placeholder="原币价税合计" />
        </a-form-model-item>
        <a-form-model-item label="原币折扣额" prop="iDisCount">
          <a-input v-model="entity.iDisCount" autocomplete="off" placeholder="原币折扣额" />
        </a-form-model-item>
        <a-form-model-item label="本币无税单价" prop="iNatUnitPrice">
          <a-input v-model="entity.iNatUnitPrice" autocomplete="off" placeholder="本币无税单价" />
        </a-form-model-item>
        <a-form-model-item label="本币无税金额" prop="iNatMoney">
          <a-input v-model="entity.iNatMoney" autocomplete="off" placeholder="本币无税金额" />
        </a-form-model-item>
        <a-form-model-item label="本币税额" prop="iNatTax">
          <a-input v-model="entity.iNatTax" autocomplete="off" placeholder="本币税额" />
        </a-form-model-item>
        <a-form-model-item label="本币价税合计" prop="iNatSum">
          <a-input v-model="entity.iNatSum" autocomplete="off" placeholder="本币价税合计" />
        </a-form-model-item>
        <a-form-model-item label="本币折扣额" prop="iNatDisCount">
          <a-input v-model="entity.iNatDisCount" autocomplete="off" placeholder="本币折扣额" />
        </a-form-model-item>
        <a-form-model-item label="累计发货辅计量数量" prop="iFHNum">
          <a-input v-model="entity.iFHNum" autocomplete="off" placeholder="累计发货辅计量数量" />
        </a-form-model-item>
        <a-form-model-item label="累计发货数量" prop="iFHQuantity">
          <a-input v-model="entity.iFHQuantity" autocomplete="off" placeholder="累计发货数量" />
        </a-form-model-item>
        <a-form-model-item label="累计原币发货金额" prop="iFHMoney">
          <a-input v-model="entity.iFHMoney" autocomplete="off" placeholder="累计原币发货金额" />
        </a-form-model-item>
        <a-form-model-item label="累计开票数量" prop="iKPQuantity">
          <a-input v-model="entity.iKPQuantity" autocomplete="off" placeholder="累计开票数量" />
        </a-form-model-item>
        <a-form-model-item label="累计开票辅计量数量" prop="iKPNum">
          <a-input v-model="entity.iKPNum" autocomplete="off" placeholder="累计开票辅计量数量" />
        </a-form-model-item>
        <a-form-model-item label="累计原币开票金额" prop="iKPMoney">
          <a-input v-model="entity.iKPMoney" autocomplete="off" placeholder="累计原币开票金额" />
        </a-form-model-item>
        <a-form-model-item label="备注 " prop="cMemo">
          <a-input v-model="entity.cMemo" autocomplete="off" placeholder="备注 " />
        </a-form-model-item>
        <a-form-model-item label="存货自由项1" prop="cFree1">
          <a-input v-model="entity.cFree1" autocomplete="off" placeholder="存货自由项1" />
        </a-form-model-item>
        <a-form-model-item label="存货自由项2" prop="cFree2">
          <a-input v-model="entity.cFree2" autocomplete="off" placeholder="存货自由项2" />
        </a-form-model-item>
        <a-form-model-item label="现无用 " prop="bFH">
          <a-input v-model="entity.bFH" autocomplete="off" placeholder="现无用 " />
        </a-form-model-item>
        <a-form-model-item label="销售订单子表标识2" prop="iSOsID">
          <a-input v-model="entity.iSOsID" autocomplete="off" placeholder="销售订单子表标识2" />
        </a-form-model-item>
        <a-form-model-item label="扣率" prop="KL">
          <a-input v-model="entity.KL" autocomplete="off" placeholder="扣率" />
        </a-form-model-item>
        <a-form-model-item label="二次扣率" prop="KL2">
          <a-input v-model="entity.KL2" autocomplete="off" placeholder="二次扣率" />
        </a-form-model-item>
        <a-form-model-item label="存货名称" prop="cInvName">
          <a-input v-model="entity.cInvName" autocomplete="off" placeholder="存货名称" />
        </a-form-model-item>
        <a-form-model-item label="税率" prop="iTaxRate">
          <a-input v-model="entity.iTaxRate" autocomplete="off" placeholder="税率" />
        </a-form-model-item>
        <a-form-model-item label="表体自定义项22" prop="cDefine22">
          <a-input v-model="entity.cDefine22" autocomplete="off" placeholder="表体自定义项22" />
        </a-form-model-item>
        <a-form-model-item label="表体自定义项23" prop="cDefine23">
          <a-input v-model="entity.cDefine23" autocomplete="off" placeholder="表体自定义项23" />
        </a-form-model-item>
        <a-form-model-item label="表体自定义项24" prop="cDefine24">
          <a-input v-model="entity.cDefine24" autocomplete="off" placeholder="表体自定义项24" />
        </a-form-model-item>
        <a-form-model-item label="表体自定义项25" prop="cDefine25">
          <a-input v-model="entity.cDefine25" autocomplete="off" placeholder="表体自定义项25" />
        </a-form-model-item>
        <a-form-model-item label="表体自定义项26" prop="cDefine26">
          <a-input v-model="entity.cDefine26" autocomplete="off" placeholder="表体自定义项26" />
        </a-form-model-item>
        <a-form-model-item label="表体自定义项27" prop="cDefine27">
          <a-input v-model="entity.cDefine27" autocomplete="off" placeholder="表体自定义项27" />
        </a-form-model-item>
        <a-form-model-item label="项目编码" prop="cItemCode">
          <a-input v-model="entity.cItemCode" autocomplete="off" placeholder="项目编码" />
        </a-form-model-item>
        <a-form-model-item label="项目大类编码" prop="cItem_class">
          <a-input v-model="entity.cItem_class" autocomplete="off" placeholder="项目大类编码" />
        </a-form-model-item>
        <a-form-model-item label="项目名称" prop="cItemName">
          <a-input v-model="entity.cItemName" autocomplete="off" placeholder="项目名称" />
        </a-form-model-item>
        <a-form-model-item label="项目大类名称" prop="cItem_CName">
          <a-input v-model="entity.cItem_CName" autocomplete="off" placeholder="项目大类名称" />
        </a-form-model-item>
        <a-form-model-item label="存货自由项3" prop="cFree3">
          <a-input v-model="entity.cFree3" autocomplete="off" placeholder="存货自由项3" />
        </a-form-model-item>
        <a-form-model-item label="存货自由项4" prop="cFree4">
          <a-input v-model="entity.cFree4" autocomplete="off" placeholder="存货自由项4" />
        </a-form-model-item>
        <a-form-model-item label="存货自由项5" prop="cFree5">
          <a-input v-model="entity.cFree5" autocomplete="off" placeholder="存货自由项5" />
        </a-form-model-item>
        <a-form-model-item label="存货自由项6" prop="cFree6">
          <a-input v-model="entity.cFree6" autocomplete="off" placeholder="存货自由项6" />
        </a-form-model-item>
        <a-form-model-item label="存货自由项7" prop="cFree7">
          <a-input v-model="entity.cFree7" autocomplete="off" placeholder="存货自由项7" />
        </a-form-model-item>
        <a-form-model-item label="存货自由项8" prop="cFree8">
          <a-input v-model="entity.cFree8" autocomplete="off" placeholder="存货自由项8" />
        </a-form-model-item>
        <a-form-model-item label="存货自由项9" prop="cFree9">
          <a-input v-model="entity.cFree9" autocomplete="off" placeholder="存货自由项9" />
        </a-form-model-item>
        <a-form-model-item label="存货自由项10" prop="cFree10">
          <a-input v-model="entity.cFree10" autocomplete="off" placeholder="存货自由项10" />
        </a-form-model-item>
        <a-form-model-item label="换算率" prop="iInvExchRate">
          <a-input v-model="entity.iInvExchRate" autocomplete="off" placeholder="换算率" />
        </a-form-model-item>
        <a-form-model-item label="计量单位编码" prop="cUnitID">
          <a-input v-model="entity.cUnitID" autocomplete="off" placeholder="计量单位编码" />
        </a-form-model-item>
        <a-form-model-item label="销售订单主表标识" prop="ID">
          <a-input v-model="entity.ID" autocomplete="off" placeholder="销售订单主表标识" />
        </a-form-model-item>
        <a-form-model-item label="表体自定义项28" prop="cDefine28">
          <a-input v-model="entity.cDefine28" autocomplete="off" placeholder="表体自定义项28" />
        </a-form-model-item>
        <a-form-model-item label="表体自定义项29" prop="cDefine29">
          <a-input v-model="entity.cDefine29" autocomplete="off" placeholder="表体自定义项29" />
        </a-form-model-item>
        <a-form-model-item label="表体自定义项30" prop="cDefine30">
          <a-input v-model="entity.cDefine30" autocomplete="off" placeholder="表体自定义项30" />
        </a-form-model-item>
        <a-form-model-item label="表体自定义项31" prop="cDefine31">
          <a-input v-model="entity.cDefine31" autocomplete="off" placeholder="表体自定义项31" />
        </a-form-model-item>
        <a-form-model-item label="表体自定义项32" prop="cDefine32">
          <a-input v-model="entity.cDefine32" autocomplete="off" placeholder="表体自定义项32" />
        </a-form-model-item>
        <a-form-model-item label="表体自定义项33" prop="cDefine33">
          <a-input v-model="entity.cDefine33" autocomplete="off" placeholder="表体自定义项33" />
        </a-form-model-item>
        <a-form-model-item label="表体自定义项34" prop="cDefine34">
          <a-input v-model="entity.cDefine34" autocomplete="off" placeholder="表体自定义项34" />
        </a-form-model-item>
        <a-form-model-item label="表体自定义项35" prop="cDefine35">
          <a-input v-model="entity.cDefine35" autocomplete="off" placeholder="表体自定义项35" />
        </a-form-model-item>
        <a-form-model-item label="表体自定义项36" prop="cDefine36">
          <a-input v-model="entity.cDefine36" autocomplete="off" placeholder="表体自定义项36" />
        </a-form-model-item>
        <a-form-model-item label="表体自定义项37" prop="cDefine37">
          <a-input v-model="entity.cDefine37" autocomplete="off" placeholder="表体自定义项37" />
        </a-form-model-item>
        <a-form-model-item label="采购数量" prop="FPurQuan">
          <a-input v-model="entity.FPurQuan" autocomplete="off" placeholder="采购数量" />
        </a-form-model-item>
        <a-form-model-item label="零售单价" prop="fSaleCost">
          <a-input v-model="entity.fSaleCost" autocomplete="off" placeholder="零售单价" />
        </a-form-model-item>
        <a-form-model-item label="零售金额" prop="fSalePrice">
          <a-input v-model="entity.fSalePrice" autocomplete="off" placeholder="零售金额" />
        </a-form-model-item>
        <a-form-model-item label="报价单号" prop="cQuoCode">
          <a-input v-model="entity.cQuoCode" autocomplete="off" placeholder="报价单号" />
        </a-form-model-item>
        <a-form-model-item label="报价单id" prop="iQuoID">
          <a-input v-model="entity.iQuoID" autocomplete="off" placeholder="报价单id" />
        </a-form-model-item>
        <a-form-model-item label="关闭标记" prop="cSCloser">
          <a-input v-model="entity.cSCloser" autocomplete="off" placeholder="关闭标记" />
        </a-form-model-item>
        <a-form-model-item label="预完工日期" prop="dPreMoDate">
          <a-input v-model="entity.dPreMoDate" autocomplete="off" placeholder="预完工日期" />
        </a-form-model-item>
        <a-form-model-item label="行号" prop="iRowNo">
          <a-input v-model="entity.iRowNo" autocomplete="off" placeholder="行号" />
        </a-form-model-item>
        <a-form-model-item label="客户BOMID" prop="iCusBomID">
          <a-input v-model="entity.iCusBomID" autocomplete="off" placeholder="客户BOMID" />
        </a-form-model-item>
        <a-form-model-item label="下达生产数量" prop="iMoQuantity">
          <a-input v-model="entity.iMoQuantity" autocomplete="off" placeholder="下达生产数量" />
        </a-form-model-item>
        <a-form-model-item label="合同号" prop="cContractID">
          <a-input v-model="entity.cContractID" autocomplete="off" placeholder="合同号" />
        </a-form-model-item>
        <a-form-model-item label="合同标的" prop="cContractTagCode">
          <a-input v-model="entity.cContractTagCode" autocomplete="off" placeholder="合同标的" />
        </a-form-model-item>
        <a-form-model-item label="合同cGuid" prop="cContractRowGuid">
          <a-input v-model="entity.cContractRowGuid" autocomplete="off" placeholder="合同cGuid" />
        </a-form-model-item>
        <a-form-model-item label="PTO母件顺序号" prop="iPPartSeqID">
          <a-input v-model="entity.iPPartSeqID" autocomplete="off" placeholder="PTO母件顺序号" />
        </a-form-model-item>
        <a-form-model-item label="母件物料id" prop="iPPartID">
          <a-input v-model="entity.iPPartID" autocomplete="off" placeholder="母件物料id" />
        </a-form-model-item>
        <a-form-model-item label="母件数量" prop="iPPartQty">
          <a-input v-model="entity.iPPartQty" autocomplete="off" placeholder="母件数量" />
        </a-form-model-item>
        <a-form-model-item label="客户存货编码" prop="cCusInvCode">
          <a-input v-model="entity.cCusInvCode" autocomplete="off" placeholder="客户存货编码" />
        </a-form-model-item>
        <a-form-model-item label="客户存货名称" prop="cCusInvName">
          <a-input v-model="entity.cCusInvName" autocomplete="off" placeholder="客户存货名称" />
        </a-form-model-item>
        <a-form-model-item label="预留数量" prop="iPreKeepQuantity">
          <a-input v-model="entity.iPreKeepQuantity" autocomplete="off" placeholder="预留数量" />
        </a-form-model-item>
        <a-form-model-item label="预留件数" prop="iPreKeepNum">
          <a-input v-model="entity.iPreKeepNum" autocomplete="off" placeholder="预留件数" />
        </a-form-model-item>
        <a-form-model-item label="预留总数量" prop="iPreKeepTotQuantity">
          <a-input v-model="entity.iPreKeepTotQuantity" autocomplete="off" placeholder="预留总数量" />
        </a-form-model-item>
        <a-form-model-item label="预留总件数" prop="iPreKeepTotNum">
          <a-input v-model="entity.iPreKeepTotNum" autocomplete="off" placeholder="预留总件数" />
        </a-form-model-item>
        <a-form-model-item label="释放日期" prop="dreleasedate">
          <a-input v-model="entity.dreleasedate" autocomplete="off" placeholder="释放日期" />
        </a-form-model-item>
        <a-form-model-item label="客户最低售价" prop="fcusminprice">
          <a-input v-model="entity.fcusminprice" autocomplete="off" placeholder="客户最低售价" />
        </a-form-model-item>
        <a-form-model-item label="进口数量" prop="fimquantity">
          <a-input v-model="entity.fimquantity" autocomplete="off" placeholder="进口数量" />
        </a-form-model-item>
        <a-form-model-item label="委外数量" prop="fomquantity">
          <a-input v-model="entity.fomquantity" autocomplete="off" placeholder="委外数量" />
        </a-form-model-item>
        <a-form-model-item label="是否全部采购" prop="ballpurchase">
          <a-input v-model="entity.ballpurchase" autocomplete="off" placeholder="是否全部采购" />
        </a-form-model-item>
        <a-form-model-item label="入库数量" prop="finquantity">
          <a-input v-model="entity.finquantity" autocomplete="off" placeholder="入库数量" />
        </a-form-model-item>
        <a-form-model-item label="成本数量" prop="icostquantity">
          <a-input v-model="entity.icostquantity" autocomplete="off" placeholder="成本数量" />
        </a-form-model-item>
        <a-form-model-item label="成本金额" prop="icostsum">
          <a-input v-model="entity.icostsum" autocomplete="off" placeholder="成本金额" />
        </a-form-model-item>
        <a-form-model-item label="出库数量" prop="foutquantity">
          <a-input v-model="entity.foutquantity" autocomplete="off" placeholder="出库数量" />
        </a-form-model-item>
        <a-form-model-item label="出库件数" prop="foutnum">
          <a-input v-model="entity.foutnum" autocomplete="off" placeholder="出库件数" />
        </a-form-model-item>
        <a-form-model-item label="累计收款原币" prop="iexchsum">
          <a-input v-model="entity.iexchsum" autocomplete="off" placeholder="累计收款原币" />
        </a-form-model-item>
        <a-form-model-item label="累计收款本币" prop="imoneysum">
          <a-input v-model="entity.imoneysum" autocomplete="off" placeholder="累计收款本币" />
        </a-form-model-item>
        <a-form-model-item label="无" prop="dufts">
          <a-input v-model="entity.dufts" autocomplete="off" placeholder="无" />
        </a-form-model-item>
        <a-form-model-item label="预订单autoid" prop="iaoids">
          <a-input v-model="entity.iaoids" autocomplete="off" placeholder="预订单autoid" />
        </a-form-model-item>
        <a-form-model-item label="预订单号" prop="cpreordercode">
          <a-input v-model="entity.cpreordercode" autocomplete="off" placeholder="预订单号" />
        </a-form-model-item>
        <a-form-model-item label="退货数量" prop="fretquantity">
          <a-input v-model="entity.fretquantity" autocomplete="off" placeholder="退货数量" />
        </a-form-model-item>
        <a-form-model-item label="退货件数" prop="fretnum">
          <a-input v-model="entity.fretnum" autocomplete="off" placeholder="退货件数" />
        </a-form-model-item>
        <a-form-model-item label="关闭日期" prop="dbclosedate">
          <a-input v-model="entity.dbclosedate" autocomplete="off" placeholder="关闭日期" />
        </a-form-model-item>
        <a-form-model-item label="关闭时间" prop="dbclosesystime">
          <a-input v-model="entity.dbclosesystime" autocomplete="off" placeholder="关闭时间" />
        </a-form-model-item>
        <a-form-model-item label="是否订单BOM" prop="bOrderBOM">
          <a-input v-model="entity.bOrderBOM" autocomplete="off" placeholder="是否订单BOM" />
        </a-form-model-item>
        <a-form-model-item label="订单BOM是否完成" prop="bOrderBOMOver">
          <a-input v-model="entity.bOrderBOMOver" autocomplete="off" placeholder="订单BOM是否完成" />
        </a-form-model-item>
        <a-form-model-item label="需求跟踪方式（1-销售订单行号；4-需求分类号5-销售订单号）" prop="idemandtype">
          <a-input v-model="entity.idemandtype" autocomplete="off" placeholder="需求跟踪方式（1-销售订单行号；4-需求分类号5-销售订单号）" />
        </a-form-model-item>
        <a-form-model-item label="需求分类代号" prop="cdemandcode">
          <a-input v-model="entity.cdemandcode" autocomplete="off" placeholder="需求分类代号" />
        </a-form-model-item>
        <a-form-model-item label="需求分类说明" prop="cdemandmemo">
          <a-input v-model="entity.cdemandmemo" autocomplete="off" placeholder="需求分类说明" />
        </a-form-model-item>
        <a-form-model-item label="采购金额" prop="fPurSum">
          <a-input v-model="entity.fPurSum" autocomplete="off" placeholder="采购金额" />
        </a-form-model-item>
        <a-form-model-item label="采购发票数量" prop="fPurBillQty">
          <a-input v-model="entity.fPurBillQty" autocomplete="off" placeholder="采购发票数量" />
        </a-form-model-item>
        <a-form-model-item label="采购发票金额" prop="fPurBillSum">
          <a-input v-model="entity.fPurBillSum" autocomplete="off" placeholder="采购发票金额" />
        </a-form-model-item>
        <a-form-model-item label="进口订单明细行" prop="iimid">
          <a-input v-model="entity.iimid" autocomplete="off" placeholder="进口订单明细行" />
        </a-form-model-item>
        <a-form-model-item label="来源单据类型" prop="ccorvouchtype">
          <a-input v-model="entity.ccorvouchtype" autocomplete="off" placeholder="来源单据类型" />
        </a-form-model-item>
        <a-form-model-item label="来源单据行号" prop="icorrowno">
          <a-input v-model="entity.icorrowno" autocomplete="off" placeholder="来源单据行号" />
        </a-form-model-item>
        <a-form-model-item label="使用客户BOM" prop="busecusbom">
          <a-input v-model="entity.busecusbom" autocomplete="off" placeholder="使用客户BOM" />
        </a-form-model-item>
        <a-form-model-item label="body_outid" prop="body_outid">
          <a-input v-model="entity.body_outid" autocomplete="off" placeholder="body_outid" />
        </a-form-model-item>
        <a-form-model-item label="已审核订货数量" prop="fVeriDispQty">
          <a-input v-model="entity.fVeriDispQty" autocomplete="off" placeholder="已审核订货数量" />
        </a-form-model-item>
        <a-form-model-item label="已审核订货原币金额" prop="fVeriDispSum">
          <a-input v-model="entity.fVeriDispSum" autocomplete="off" placeholder="已审核订货原币金额" />
        </a-form-model-item>
        <a-form-model-item label="报价含税标识" prop="bsaleprice">
          <a-input v-model="entity.bsaleprice" autocomplete="off" placeholder="报价含税标识" />
        </a-form-model-item>
        <a-form-model-item label="赠品标识" prop="bgift">
          <a-input v-model="entity.bgift" autocomplete="off" placeholder="赠品标识" />
        </a-form-model-item>
        <a-form-model-item label="产品预测单子表编码" prop="forecastdid">
          <a-input v-model="entity.forecastdid" autocomplete="off" placeholder="产品预测单子表编码" />
        </a-form-model-item>
        <a-form-model-item label="子键需求分类代号" prop="cdetailsdemandcode">
          <a-input v-model="entity.cdetailsdemandcode" autocomplete="off" placeholder="子键需求分类代号" />
        </a-form-model-item>
        <a-form-model-item label="子键需求分类说明" prop="cdetailsdemandmemo">
          <a-input v-model="entity.cdetailsdemandmemo" autocomplete="off" placeholder="子键需求分类说明" />
        </a-form-model-item>
        <a-form-model-item label="库存调拨数量" prop="fTransedQty">
          <a-input v-model="entity.fTransedQty" autocomplete="off" placeholder="库存调拨数量" />
        </a-form-model-item>
        <a-form-model-item label="单据行条码" prop="cbSysBarCode">
          <a-input v-model="entity.cbSysBarCode" autocomplete="off" placeholder="单据行条码" />
        </a-form-model-item>
        <a-form-model-item label="请购数量" prop="fappqty">
          <a-input v-model="entity.fappqty" autocomplete="off" placeholder="请购数量" />
        </a-form-model-item>
        <a-form-model-item label="父节点编码" prop="cParentCode">
          <a-input v-model="entity.cParentCode" autocomplete="off" placeholder="父节点编码" />
        </a-form-model-item>
        <a-form-model-item label="子节点编码" prop="cChildCode">
          <a-input v-model="entity.cChildCode" autocomplete="off" placeholder="子节点编码" />
        </a-form-model-item>
        <a-form-model-item label="使用数量" prop="fchildqty">
          <a-input v-model="entity.fchildqty" autocomplete="off" placeholder="使用数量" />
        </a-form-model-item>
        <a-form-model-item label="权重比例" prop="fchildrate">
          <a-input v-model="entity.fchildrate" autocomplete="off" placeholder="权重比例" />
        </a-form-model-item>
        <a-form-model-item label="发货模式" prop="iCalcType">
          <a-input v-model="entity.iCalcType" autocomplete="off" placeholder="发货模式" />
        </a-form-model-item>
        <a-form-model-item label="无" prop="iCurPartid">
          <a-input v-model="entity.iCurPartid" autocomplete="off" placeholder="无" />
        </a-form-model-item>
        <a-form-model-item label="cFactoryCode" prop="cFactoryCode">
          <a-input v-model="entity.cFactoryCode" autocomplete="off" placeholder="cFactoryCode" />
        </a-form-model-item>
        <a-form-model-item label="GCSourceId" prop="GCSourceId">
          <a-input v-model="entity.GCSourceId" autocomplete="off" placeholder="GCSourceId" />
        </a-form-model-item>
        <a-form-model-item label="GCSourceIds" prop="GCSourceIds">
          <a-input v-model="entity.GCSourceIds" autocomplete="off" placeholder="GCSourceIds" />
        </a-form-model-item>
      </a-form-model>
    </a-spin>
  </a-modal>
</template>

<script>
export default {
  props: {
    parentObj: {
      type: Object,
      default () {
        return {}
      }
    },
    PDeptId: { default: '', type: String } // 组织ID
  },
  data () {
    return {
      layout: {
        labelCol: { span: 5 },
        wrapperCol: { span: 18 }
      },
      visible: false,
      loading: false,
      entity: {},
      rules: {},
      title: ''
    }
  },
  methods: {
    init () {
      this.visible = true
      this.entity = {}
      this.$nextTick(() => {
        this.$refs['form'].clearValidate()
      })
    },
    openForm (id, title) {
      this.init()
      this.title = title
      if (id) {
        this.loading = true
        this.$http.post('/OrderManagement/SO_SODetails/GetTheData', { id: id }).then(resJson => {
          this.loading = false
          this.entity = resJson.Data
        })
      }
    },
    handleSubmit () {
      this.$refs['form'].validate(valid => {
        if (!valid) {
          return
        }
        this.loading = true
        this.$http.post('/OrderManagement/SO_SODetails/SaveData', this.entity).then(resJson => {
          this.loading = false
          if (resJson.Success) {
            this.$message.success('操作成功!')
            this.loading = false
            this.visible = false
	        this.$emit('returnMain')
          } else {
            this.$message.error(resJson.Msg)
            this.loading = false
          }
        })
      })
    },
    // 非空校验
    validEmpty (index, name, tips) {
      return (rule, value, callback) => {
        const data = this.DetaiData[index][name]
        if (!data) {
          this.$message.warning('列表第' + (index + 1) + '行：' + tips)
          callback(tips || '必填')
        } else {
          callback()
        }
      }
    }
  }
}
</script>
<style scoped>
</style>
